export default {
	state: {
		id: '',
		username: '',
		img:''
	},
	mutations: {
		setUser(state, user) {
			state.id = user.id,
				state.username = user.username,
				state.img =user.img
		}
	},
	actions: {},
	getters: {
		islogn(state) {
			return state.id !== 0 //通过id不等于0为true判断是否有用户
		}

	},
	namespaced: true //名字不冲突
}
